package com.zx.stock.common;


import lombok.Getter;
import lombok.Setter;

/**
 * ajax请求 返回数据类
 */
@Getter
@Setter
public class Result {

	private int code;  //状态码
	private String msg; //提示信息
	private Object data; //返回数据
	

	public Result() {
		super();
		this.code = ResultEnum.SUCCESS.getCode();
		this.msg = ResultEnum.SUCCESS.getMsg();
	}
	public Result(int code, String msg) {
		super();
		this.code = code;
		this.msg = msg;
	}
	public Result(Object data) {
		this.code = ResultEnum.SUCCESS.getCode();
		this.msg = ResultEnum.SUCCESS.getMsg();
		this.data = data;
	}

	public Result(ResultEnum rsEnum) {
		super();
		this.code = rsEnum.getCode();
		this.msg = rsEnum.getMsg();
	}

	public Result(int code, String msg, Object data) {
		super();
		this.code = code;
		this.msg = msg;
		this.data = data;
	}

	
}
